<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Spiskovi</title>
        <h:outputStylesheet library="css" name="styles.css"/> 
    </h:head>
    <h:body>
        <ui:include src="profMenuBar.xhtml"/>
        <h:form>
            <p:panel header="Dodaj spisak" styleClass="headerPanel">
                <p:panelGrid columns="2">
                    <h:outputLabel value="Naziv:"/>
                    <p:inputText value="#{profBean.SNaziv}"/>

                    <h:outputLabel value="Termin:"/>
                    <p:inputText value="#{profBean.STermin}"/>

                    <h:outputLabel value="Mesto:"/> 
                    <p:inputText value="#{profBean.SMesto}"/> 


                    <h:outputLabel value="Limit:"/> 
                    <p:panel>
                        <p:inputText id="limit" value="#{profBean.SLimit}" style="margin-bottom:   5px"/><br/>
                        <p:slider for="limit" minValue="0" maxValue="200" />
                    </p:panel>
                    <h:outputLabel value="Predmet:"/> 
                    <p:selectOneMenu value="#{profBean.selectedP}" var="p" converter="courseConverter">
                        <f:selectItems value="#{profBean.PList}" var="predmet" itemLabel="#{predmet.naziv} - #{predmet.sifra}" itemValue="#{predmet}"/>

                        <p:column>
                            #{p.naziv} - #{p.sifra}
                        </p:column>
                    </p:selectOneMenu>
                    <p:commandButton value="Dodaj" action="#{profBean.addList()}" ajax="false" style="margin: auto; margin-left: 100px;"/>
                </p:panelGrid>
            </p:panel>
        </h:form>
    </h:body>
</html>

